import request from "@/utils/request";

// 获取权限列表数据
export const getPermissionList = () =>{
  return request({
    url: '/sys/permission',
  })
}

// 添加权限
export const addPermission = (data) => {
  return request({
    url: "/sys/permission",
    method: 'post',
    data
  })
}

// 获取权限详情数据
export const getPermissionDetail = (id) => {
  return request({
    url: `/sys/permission/${id}`,
  })
}

// 编辑权限
export const editPermission = (data) => {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}